﻿<%
'首页展示入口
'转发至相应blog自定义页面，如转发失败则使用默认页面
'如为wap客户端则转至wap首页

if instr(lcase(request.ServerVariables("HTTP_ACCEPT")),"wml")>0 then
  response.contentType="text/vnd.wap.wml"
  response.charset=65001  
%>
<?xml version="1.0"  encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapfourm.org/DTD/wml_1.1.xml">
<wml>
<head>
  <meta http-equiv="Cache-Control" content="max-age=7" forua="true" /> 
</head>
<card title="Welcome" ontimer="/blog/wap/index.asp" >
<timer value="2"/> 
<p align="center">Loading, please wait..</p>
<p align="center"><a href="wap/index.asp">Enter</a></p>
</card>
</wml>
<%
else 
    dim blog_id,inc_file
    blog_id = trim(request("blog_id"))
    
    on error resume next
    
    if blog_id<>"" then
        inc_file = "data/"& clng(blog_id) &"/index.asp"
        Server.transfer(inc_file)
        
        if Err.number=0 then
            response.end
        end if    
    end if
        
    Err.clear
    
    on error goto 0
    Server.transfer("data/default/index.asp")
end if
%>
